package com.example.demo.runner;

import com.example.demo.properties.BootStrapProps;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * @author: YanMing.Wang
 * @date: 2024-02-28
 * @desp: TODO
 */
@Component
@Order(2)
public class BootStrapRunner implements ApplicationRunner {

    @Autowired
    private BootStrapProps props;

    @Override
    public void run(ApplicationArguments args) throws Exception {

        System.out.println("bootstrap配置信息--name:" + props.getName() + ",port:" + props.getPort());

    }
}
